package cn.neusoft.service.impl;

import cn.neusoft.mapper.FoodMapper;
import cn.neusoft.pojo.Food;
import cn.neusoft.service.IFoodService;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodService extends ServiceImpl<FoodMapper, Food> implements IFoodService {

    @Autowired
    FoodMapper foodMapper;

    @Override
    public List<Food> getByBusinessId(Integer bid) {
        return foodMapper.selectList(new QueryWrapper<Food>().eq("businessId", bid));
    }
}
